/*
 * HttpResponse.cpp
 *
 *  Created on: 09.12.2012
 *      Author: zheka
 */

#include "HttpResponse.hpp"
#include "HttpConstants.hpp"
#include <sstream>

void HttpResponse::setResponseCode(const std::string & responseCode) {
	this->responseCode = responseCode;
}
std::string HttpResponse::getResponseCode() {
	return responseCode;
}


std::string HttpResponse::toString() const {
	std::stringstream out;

	out << httpVersion << " " << responseCode << HttpConstants::HTTP_NEWLINE;

	out << HttpBaseHeader::toString();

	out << HttpConstants::HTTP_NEWLINE;

	return out.str();
}
